{% extends "template/listEdit.volt" %}

{% block title %}钥匙列表{% endblock %}


{% block filter %}
    <div class="col-md-4 col-sm-6 col-xs-12">
        <table>
            <tr>
                <th>钥匙ID:</th>
                <td><input type="text" name="key_id" value="" data-valid="integer"></td>
            </tr>
            <tr>
                <th>持有单位:</th>
                <td><input type="text" name="unit_name" value="" ></td>
            </tr>
            <tr>
                <th>联系地址:</th>
                <td><input type="text" name="contact_addr" value="" ></td>
            </tr>
        </table>
    </div>
    <div class="col-md-4 col-sm-6 col-xs-12">
        <table>
            <tr>
                <th>飞机序列号:</th>
                <td><input type="text" name="uas_serial_id" value=""></td>
            </tr>
            <tr>
                <th>电话:</th>
                <td><input type="text" name="phone" value="" ></td>
            </tr>
            <tr>
                <th>备注:</th>
                <td><input type="text" name="remark" value="" ></td>
            </tr>
        </table>
    </div>
    <div class="col-md-4 col-sm-6 col-xs-12">
        <table>
            <tr>
                <th>钥匙型号:</th>
                <td><select name="planeModel_id">
                        <option value="">请选择</option>
                        {% for id,name in planeTypeList %}
                            <option value="{{ id }}">{{ name }}</option>
                        {% endfor %}
                    </select></td>
            </tr>
            <tr>
                <th>联系人:</th>
                <td><input type="text" name="contact_name" value="" ></td>
            </tr>
            <tr>
                <td colspan="2">
                    <div id="btn_reset_param" class="btn-0 button">重 置</div>
                    <div id="btn_search_data" class="btn-1 button">过 滤</div>
                </td>
            </tr>
        </table>
    </div>
{% endblock %}
{% block hiddenCheckAll %}hidden{% endblock %}
{% block hiddenDeleteAll %}hidden{% endblock %}

{% block jscontent %}
    <script>
        $(function () {
            PageDataProxy.init({
                "action_detail_url": "/plane/detailKey",
                "url": "/plane/listKey",
                "table_id": "#mytable",
                "page_control_id": "#data-wrap",
                "page_size_id": "#rows-perpage-select",
                "page_total_id": "#data_count_total",
                "use_check_box": false,
                "data_field_process": function (name, value) {

                    if (name == "id") {

                        return "<a href='javascript:void(0)' onclick=PageDataProxy.actionDetail('id=" + value + "')>" + value + "</a>";
                    }
                    return value;
                },
                "table_style": {
                    "id": "width-50",
                    "key_id": "width-m",
                    "uas_serial_id": "width-150",
                    "planeModel_id": "width-100",
                    "created_at": "width-150"
                },
                "data_field_action_process": function (tag) {
                    return "<td onclick=PageDataProxy.actionDetail('id=" + tag + "')><img class='action-show-icon'>详细</td>";
                },
            });


        })
    </script>
{% endblock %}